/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package memsim.instructions;

/**
 *
 * @author Joe
 * This class performs a logical OR on two scalars and returns the result as
 * and integer
 */
public class ORS {

    /**
     *
     * @param op1  Operand1 for or
     * @param op2  Operand2 for or
     * @return     The result of op1 | op2
     */

    public int orScalar(int op1, int op2){
		long result;
                UnsignedHelper uH = new UnsignedHelper();

                result = uH.UnsignedLongFromInt(op1) | uH.UnsignedLongFromInt(op2);

                result = result & 0xFFFFFFFFL;

		return (int)result;

	}

}
